%clear all; clc;
%close all;


gain_yt0=load('welf_gains_blunt_yt.txt');    
gain_b0=load('welf_gains_blunt_debt.txt');

yt_grid = exp(gain_yt0(:,1));
gain_yt = 100*gain_yt0(:,2);

NameArray = {'LineStyle','Color','LineWidth'};
ValueArray1 = {'-';[0.078  0.1686  0.549];2}';
ValueArray2 = {'--','-';[0.078  0.1686  0.549],[0.8  0  0];2,2}';  

nameFig = char([char(label_model) '_' char(label_graph) '_yt']);
figure('name',nameFig);
P=plot(yt_grid,gain_yt);  xlabel('y^T','FontSize',16);ylabel('%','Fontsize',16);
AX1 = gca;box on;set(AX1,'FontSize',16,'YTick',-0.6:0.2:0.2,'YLim',[-0.6 0.2],'XTick',0.9:0.05:1.15); %,'XLim',[-29 -17]);%axis(AX1,[0.08 xmax 0.8 0.16]);
set(P,NameArray,ValueArray1);grid on;
%saveas(gcf, fullfile(plot_path, nameFig),format_chart);
exportfig(gcf, fullfile(plot_path, nameFig),'color','cmyk','resolution',1600);

b_grid(:,1)=-gain_b0(:,1)/(.184 + 0.02);
gain_b     = 100*gain_b0(:,2);


nameFig = char([char(label_model) '_' char(label_graph) '_b']);
figure('name',nameFig);
P=plot(b_grid,gain_b);  xlabel('debt','FontSize',16);ylabel('%','Fontsize',16);
%xlabel(['lower limit for total income' char(10) '(Difference relative to average total income, %)'],'FontSize',16);
AX1 = gca;box on;set(AX1,'FontSize',16,'YTick',-1:0.2:0.2,'YLim',[-1 0.2],'XTick',-1.5:0.5:1.5,'XLim',[0 1.5]);%axis(AX1,[0.08 xmax 0.8 0.16]);
set(P,NameArray,ValueArray1);grid on;
%set(AX1,'YTick',-14.75:0.05:-14.65 ,'YLim',[-14.8 -14.4],'FontSize',25);
%saveas(gcf, fullfile(plot_path, nameFig),format_chart);
exportfig(gcf, fullfile(plot_path, nameFig),'color','cmyk','resolution',1600);